package cn.tedu.truetaste.pojo.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

@ApiModel(value="订单商品新增DTO")
@Data
public class OrderItemAddDTO implements Serializable {

    private static final long serialVersionUID = 1L;
    private static final String VALIDATE_MESSAGE_PREFIX = "新增订单失败，";
    /**
     * SKU id
     */
    @ApiModelProperty(value="skuId",example = "1",required = true)
    @NotNull(message =VALIDATE_MESSAGE_PREFIX+"请提供菜品SKUID" )
    private Long skuId;

    /**
     * 菜品SKU名称
     */
    @ApiModelProperty(value="菜品SKU名称",example = "红烧肉")
    @NotNull(message =VALIDATE_MESSAGE_PREFIX+"请提供菜品名称" )
    private String name;

    /**
     * 菜品SKU图片URL
     */
    @ApiModelProperty(value="菜品SKU图片URL",example = "picture1")
    @NotNull(message =VALIDATE_MESSAGE_PREFIX+"请提供菜品主图片" )
    private String mainPicture;

    /**
     * 商品SKU单价
     */
    @ApiModelProperty(value="菜品SKU单价",example = "19.99")
    @NotNull(message =VALIDATE_MESSAGE_PREFIX+"请提供菜品单价" )
    private Double price;

    /**
     * 菜品SKU购买数量
     */
    @ApiModelProperty(value="菜品SKU购买数量",example = "2")
    @NotNull(message =VALIDATE_MESSAGE_PREFIX+"请提供菜品购买数量" )
    private Integer num;
}
